package com.lie.prepare.algorithm.practise;

/**
 * Created by lie on 2018/4/12.
 * 测试在test包里
 */
public class IntegerBS extends ABS {

    private int[] array;
    private int key;

    public int sort(int[] array, int key) {
        this.array = array;
        this.length = array.length;
        this.key = key;
        return doSearch();
    }

    boolean largerThanKey(int index) {
        return array[index] > key;
    }

    boolean equalOrNot(int index) {
        return array[index] == key;
    }
}
